package top.leyi.IService;

import top.leyi.entity.Talk.SimpleTalk;
import top.leyi.entity.Talk.Talk;
import top.leyi.entity.user.User;
import top.leyi.exception.TalkNotFoundException;

import java.util.List;
import java.util.Map;

public interface ITalkService {

    int LIMIT  = 10;
    int MAX_SIZE = 100;
    int MAX_SIZE_LIMIT = MAX_SIZE * 3/2;
    /**
     * 获取到指定数量的说说
     * @return
     */
    public List   getTalks(int offset, int userId, String key);
    /**
     * 通过talkid查说说细节
     * @return
     */
    public Talk   getTalkWithId(int talkId, User user);
    /**
     * 获取到指定数量的说说
     * @return
     */
    public List   getHistoryTalks(int offset, int userId, String key);
    /**
     * 获取到指定数量的说说
     * @return
     */
    public List getHotTalks(int userId);
    /**
     * 发布一条说说
     * @return
     */
    public Talk addTalk(Talk talk, User user);

    /**
     * 评论一条说说
     * @return
     */
    public Talk commentTalk(Talk comment, User user) throws TalkNotFoundException;

    /**
     * 点赞一条说说
     * @return
     */
    public void goodTalk(Talk good, User user) throws TalkNotFoundException;

    /**
     * 删除一条说说
     * @return
     */
    public void deleteTalk(Talk talk )throws TalkNotFoundException;
    /**
     * 删除一条评论
     * @return
     */
    public void deleteComment(Talk talk )throws TalkNotFoundException;


}
